
<template>
    <div>
        <ul>
            <li v-for="(item,i) in $store.state.list" @click="del(i)">{{item}}</li>
        </ul>
    </div>
</template>

<script>
export default {
    methods:{
        del(i){
            this.$store.commit('delMsg',i);
        }
    }
}
</script>